import { post } from '../http'

/**
 * @description: 短租订单-列表
 * @param data
 * @return Promise
 */
export const getList = (data) => post({ url: '/sOrder/pageList', data })

/**
 * @description: 短租订单-单量统计
 * @param data
 * @return Promise
 */
export const getStatistics = (data) => post({ url: '/sOrder/findStatistics', data })

/**
 * @description: 交/还车人维护
 * @param data
 * @return Promise
 */
export const editGiveReturnStaff = (data) => post({ url: '/sOrder/editGiveReturnStaff', data })

/**
 * @description: 订单完成前校验
 * @param data
 * @return Promise
 */
export const finishCheck = (data) => post({ url: '/sOrder/finishCheck', data })

/**
 * @description: 完成订单
 * @param data
 * @return Promise
 */
export const finish = (data) => post({ url: '/sOrder/finish', data })

/**
 * @description: 取消订单
 * @param data
 * @return Promise
 */
export const cancel = (data) => post({ url: '/sOrder/cancel', data })

/**
 * @description: 作废订单
 * @param data
 * @return Promise
 */
export const invalidOrder = (data) => post({ url: '/sOrder/invalidOrder', data })

/**
 * @description: 根据手机号查询
 * @param data
 * @return Promise
 */
export const findByPhone = (data) => post({ url: '/czcCustMember/findByPhone', data })

/**
 * @description: 计算租期
 * @param data
 * @return Promise
 */
export const computeRentDay = (data) => post({ url: '/sOrder/computeRentDay', data })

/**
 * @description: 短租订单-详情
 * @param data
 * @return Promise
 */
export const getShortOrdrDetails = (data) => post({ url: '/sOrder/detail', data })

// 短租订单-获取手动生产电子合同信息
export const getSorderContractInfo = (data) => post({ url: '/sOrder/contractOrderDetail', data })

/**
 * @description: 短租订单-订单费用信息
 * @param data
 * @return Promise
 */
export const getShortOrdrFeeDetail = (data) => post({ url: '/sOrder/orderFeeList', data })

/**
 * @description: 短租订单-订单费用信息
 * @param data
 * @return Promise
 */
export const getShortOrdrReletList = (data) => post({ url: '/sOrder/reletList', data })

/**
 * @description: 短租订单-获取账号前置信息收付款方式
 * @param data
 * @return Promise
 */
export const getAccountByPageData = (data) => {
  // 忽略退款抵扣违约金,需要显示 => 请加字段frontIsIgnore
  if ([undefined, null].includes(data.frontIsIgnore)) {
    data.ignoreWays = ['-2']
  }
  return post({ url: '/inExpAccount/getWayByType', data })
}

/**
 * @description: 短租订单-根据收付款方式和收付款类型查询账号信息
 * @param data
 * @return Promise
 */
export const getAccountByWayAndType = (data) => post({ url: '/inExpAccount/getAccountByWayAndType', data })

/**
 * @description: 短租订单-费用信息 - 去确认
 * @param data
 * @return Promise
 */
export const feetoConfirm = (data) => post({ url: '/orderFee/toConfirm', data })

/**
 * @description: 短租订单-费用信息 - 确认
 * @param data
 * @return Promise
 */
export const feeSubmit = (data) => post({ url: '/orderFee/confirm', data })

/**
 * @description: 短租订单-换车记录
 * @param data
 * @return Promise
 */
export const carReplaceList = (data) => post({ url: '/sOrder/replaceList', data })

/**
 * @description: 短租订单-计算订单相关的金额
 * @param data
 * @return Promise
 */
export const calcPrice = (data) => post({ url: '/sOrder/calcPrice', data })

/**
 * @description: 创建订单
 * @param data
 * @return Promise
 */
export const createOrder = (data) => post({ url: '/sOrder/createOrder', data })

/**
 * @description: 订单交车
 * @param data
 * @return Promise
 */
export const giveCar = (data) => post({ url: '/sOrder/giveCar', data })

/**
 * @description: 订单还车
 * @param data
 * @return Promise
 */
export const returnCar = (data) => post({ url: '/sOrder/returnCar', data })

/**
 * @description: 订单续租
 * @param data
 * @return Promise
 */
export const reletOrder = (data) => post({ url: '/sOrder/reletOrder', data })

/**
 * @description: 获取押金的可用金额
 * @param data
 * @return Promise
 */
export const queryActiveAmount = (data) => post({ url: '/sOrderDeposit/queryActiveAmount', data })

/**
 * @description: 订单换车
 * @param data
 * @return Promise
 */
export const replaceCar = (data) => post({ url: '/sOrder/replaceCar', data })

/**
 * @description: 添加费用
 * @param data
 * @return Promise
 */
export const addOrderCost = (data) => post({ url: '/sOrder/addOrderCost', data })

/**
 * @description: 修改承租人
 * @param data
 * @return Promise
 */
export const editMemberInfo = (data) => post({ url: '/sOrder/editMemberInfo', data })

/**
 * @description: 修改订单
 * @param data
 * @return Promise
 */
export const modifyOrder = (data) => post({ url: '/sOrder/modifyOrder', data })

/**
 * @description: 费用详情
 * @param data
 * @return Promise
 */
export const orderFeeDetail = (data) => post({ url: '/orderFee/detail', data })

/**
 * @description: 修改费用
 * @param data
 * @return Promise
 */
export const modifyOrderFee = (data) => post({ url: '/orderFee/modify', data })

/**
 * @description: 订单导出
 * @param data
 * @return Promise
 */
export const exportExcel = (data) => post({ url: '/sOrder/exportExcel', data })

/**
 * @description: 新订单导出
 * @param data
 * @return Promise
 */
export const exportBaseExcel = (data) => post({ url: '/sOrder/exportBaseExcel', data })

/**
 * @description: 获取当前的同步渠道列表
 * @param data
 * @return Promise
 */
export const queryActiveChannel = (data) => post({ url: '/channelAccount/queryActiveChannel', data })

/**
 * @description: 同步订单-按渠道类型
 * @param data
 * @return Promise
 */
export const syncOtaAndType = (data) => post({ url: '/channelAccount/syncOtaAndType', data })

/**
 * @description: 短租操作记录
 * @param data
 * @return Promise
 */
export const operateLogList = (data) => post({ url: '/sOrder/operateLogList', data })

/**
 * @description: 合并前确认
 * @param data
 * @return Promise
 */
export const checkManyToConfirm = (data) => post({ url: '/orderFee/checkManyToConfirm', data })

/**
 * @description: 获取费用系数
 * @param data
 * @return Promise
 */
export const calcRateAPI = (data) => post({ url: '/sOrder/calcRate', data })

/**
 * @description: 查询合同记录 短租
 * @param data
 * @return Promise
 */
export const contractRecordAPI = (data) => post({ url: '/svmsContract/contractRecord', data })

/**
 * @description: 查询合同记录 长租
 * @param data
 * @return Promise
 */
export const signRecordAPI = (data) => post({ url: '/czsOrderInfo/signRecord', data })

/**
 * @description: 下载(预览)合同
 * @param data
 * @return Promise
 */
export const downloadContractAPI = (data) => post({ url: '/svmsContract/downloadContractFile', data })

/**
 * @description: 批量下载合同
 * @param data
 * @return Promise
 */
export const butchDownloadContractAPI = (data) => post({ url: '/svmsContract/butchDownloadContractFile', data })

/**
 * @description: 无需签署（取消合同）
 * @param data
 * @return Promise
 */
export const invalidAPI = (data) => post({ url: '/svmsContract/invalid', data })

/**
 * @description: 发起合同
 * @param data
 * @return Promise
 */
export const initiateAPI = (data) => post({ url: '/svmsContract/initiate', data })

/**
 * @description: 作废合同
 * @param data
 * @return Promise
 */
export const nullifyAPI = (data) => post({ url: '/svmsContract/nullify', data })

/**
 * @description: 发起签署时判断商户余额
 * @param data
 * @return Promise
 */
export const determineAPI = (data) => post({ url: '/enterprise/determine', data })

/**
 * @description: 获取商户签署链接（操作按钮里的去签署和去作废）
 * @param data
 * @return Promise
 */
export const getTenantSignUrlAPI = (data) => post({ url: '/svmsContract/getTenantSignUrl', data })

/**
 * @description: 撤回合同
 * @param data
 * @return Promise
 */
export const revokeAPI = (data) => post({ url: '/svmsContract/revoke', data })

/**
 * @description: 获取承租方签署链接(表格里的快速复制)
 * @param data
 * @return Promise
 */
export const getLesseeSignUrlAPI = (data) => post({ url: '/svmsContract/getLesseeSignUrl', data })

/**
 * @description: 商户自动签章
 * @param data
 * @return Promise
 */
export const tenantSelfSignAPI = (data) => post({ url: '/svmsContract/tenantSelfSign', data })

/**
 * @description: 上传合同
 * @param data
 * @return Promise
 */
export const uploadContractAPI = (data) => post({ url: '/czsOrderInfo/uploadContract', data })

/**
 * @description: 长租批量下载
 * @param data
 * @return Promise
 */
export const czbutchDownloadContractFileAPI = (data) => post({ url: '/czsOrderInfo/butchDownloadContractFile', data })

/**
 * @description: 重新生成
 * @param data
 * @return Promise
 */
export const createQysContractAPI = (data) => post({ url: '/svmsContract/createQysContract', data })

/**
 * 手动生成电子合同
 */
export const createContractAPI = (data) => post({ url: '/svmsContract/manualCreateQysContract', data })

// 修改车辆信息
export const editCarInfoAPI = (data) => post({ url: '/sOrder/editOrderCarInfo', data })

// 生成电子合同补充商户车牌号
export const createContractCarAPI = (data) => post({ url: '/channelAccount/license/channelCarLicenseDetail', data })

// 自驾长/短租车型价格系统模板费用回填校验
export const inspectPrice = (data) => post({ url: '/czsOrderInfo/inspectPrice', data })

// 长短租详情-运营成本总额
export const getOperateCost = (data) => post({ url: '/cost/amountCountByBusiness', data })

// 长短租详情-ETC租赁订单
export const getEtcOrder = (data) => post({ url: '/etcOrder/selectByRefId', data })
/** 删除续租 */
export const deleteRelet = (data) => post({ url: '/sOrder/deleteRelet', data })

/** 续租校验 */
export const checkRelet = (data) => post({ url: '/sOrder/modifyRerentCheck', data })

/** 修改续租后换车时间 */
export const modifyReletCarTime = (data) => post({ url: '/sOrder/updateRelet', data })

/** 修改车牌号 */
export const updateCarLicenseNo = (data) => post({ url: '/sOrder/updateCarLicenseNo', data })
/** 订单好评 */
export const orderGoodEvaluate = (data) => post({ url: '/sOrder/orderPositiveReviews', data })

/** 获取未好评订单 */
export const getNoEvaluateOrder = (data) => post({ url: '/sOrder/getPositiveReviewsAllList', data })

/** 备注操作记录 */
export const getRemarkLogApi = (data) => post({ url: '/sOrder/operateRemarkLogList', data })

/** 修改换车备注 */
export const updateRemarkLogApi = (data) => post({ url: '/sOrder/modifyReplaceCarRemark', data })

/** 添加订单备注 */
export const createRemarkApi = (data) => post({ url: '/sOrder/createOrderRemark', data })
/** 获取运营主体 */
export const getOperateSubject = (data) => post({ url: '/channelAccount/pageList', data })

/** 添加自定义标签 */
export const addCustomTag = (data) => post({ url: '/sOrder/addCustomLabel', data })

// 获取押金收取方式
export const getDepositType = (data) => post({ url: '/sOrder/getViolationDepositFee', data })

// 获取合同记录数量
export const getContractRecordCount = (data) => post({ url: '/svmsContract/getContractNum', data })

/**
 * 获取电子合同信息
 */
export const getContractInfo = (data) => post({ url: '/svmsContract/getContractData', data })

/**
 * 修改电子合同信息
 */
export const updateFreeContract = (data) => post({ url: '/svmsContract/updateFreeContract', data })

// 修改对账金额
export const modifyStatementAmountApi = (data) => post({ url: '/sOrder/modifyStatementAmount', data })

// 费用金额统计
export const feeAmountCount = (data) => post({ url: '/sOrder/orderFeeStatistics', data })

// 费用备注
export const remarkLogList = (data) => post({ url: '/orderFee/remarkLogList', data })

// 渠道抽佣列表
export const channelCommissionList = (data) => post({ url: '/channelCommissionRate/list', data })

// 编辑渠道抽佣
export const editChannelCommission = (data) => post({ url: '/channelCommissionRate/modify', data })

// 生成电子合同判断逻辑优化
export const checkContractData = (data) => post({ url: '/svmsContract/checkContractData', data })
// 删除费用
export const orderFeeDel = (data) => post({ url: '/orderFee/delete', data })
// 添加费用备注
export const orderFeeAddRemark = (data) => post({ url: '/orderFee/createRemark', data })

// 订单费用导出
export const exportOrderFeeExcel = (data) => post({ url: '/sOrder/exportOrderFeeExcel', data })
// 导出获取全部费项
export const getSelectAllItemName = (data) => post({ url: '/sOrder/selectAllItemName', data })

// 已结算费用退款
export const orderFeeRefund = (data) => post({ url: '/orderFee/selectGroupFee', data })

// 获取费用名称
export const selectFeeItemName = (data) => post({ url: '/sOrder/selectFeeItemName', data })
// 获取渠道账号
export const getChannelAccount = (data) => post({ url: '/channelAccount/selectList', data })

// 核实订单
export const verifyOrder = (data) => post({ url: '/sOrder/orderAuditing', data })
// 订单通知
export const orderNoticeListAPI = (data) => post({ url: '/sOrder/orderNoticeList', data })

// 获取冻结中押金订单数量
export const getFreezeOrderCountAPI = (data) => post({ url: '/sOrder/getFreezeOrderCount', data })
// 查看免押码信息
export const getFreeDepositCodeInfo = (data) => post({ url: '/sOrder/getFreeDepositCodeInfo', data })
// 查看免押码二维码信息
export const getFreeDepositCode = (data) => post({ url: '/sOrder/getFreeDepositCode', data })
// 修改押金
export const changeDepositAmount = (data) => post({ url: '/sOrder/changeDepositAmount', data })
//芝麻免押详情
export const depositdetailV5 = (data) => post({ url: '/sOrderDeposit/detailV5', data })
//获取押金扣款详情
export const cutPaymentDetail = (data) => post({ url: '/sOrderDeposit/cutPaymentDetail', data })
//租车押金转违章押金
export const zmChangeDeposit = (data) => post({ url: '/sOrderDeposit/changeDeposit', data })
// 解冻押金
export const thawDeposit = (data) => post({ url: '/sOrderDeposit/unfreezeDeposit', data })
//押金扣款
export const cutPayment = (data) => post({ url: '/sOrderDeposit/cutPayment', data })
// 根据承租人ID获取可用押金订单列表
export const getUsableAmountOrderList = (data) => post({ url: '/sOrderDeposit/getUsableAmountOrderList', data })
// 修改换车时间
export const updateChangeCarTime = (data) => post({ url: '/sOrder/modifyReplaceTime', data })
//押金扣款-获取租车费用
export const getCarFeeDetail = (data) => post({ url: '/sOrderDeposit/getCarFeeDetail', data })
//押金扣款-获取违章费用
export const getViolationFeeListByMemberId = (data) => post({ url: '/sOrderDeposit/getViolationFeeListByMemberId', data })
//押金操作验证
export const checkDeposit = (data) => post({ url: '/sOrderDeposit/depositOperationValidate', data })